package com.zys.el.user.controller;

import com.github.pagehelper.PageInfo;
import com.zys.el.core.controller.BaseController;
import com.zys.el.core.json.JSON;
import com.zys.el.core.po.BaseEntity;
import com.zys.el.user.po.TimeInfo;
import com.zys.el.user.service.ITimeInfoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.sql.Time;

@CrossOrigin
@RestController
@RequestMapping("/time-info")
public class TimeInfoController extends BaseController<ITimeInfoService, TimeInfo> {

    /**
     * 分页查询
     *
     * @param page
     * @param rows
     * @return
     */
    @ApiOperation(value = "分页查询", notes = "分页查询")
    @PostMapping("/lastes")
    public PageInfo<TimeInfo> lastetesInfo(@RequestParam(name = "page", defaultValue = "1", required = true) int page,
                                @RequestParam(name = "rows", defaultValue = "10", required = true) int rows) {
        TimeInfo timeInfo = new TimeInfo();
        PageInfo<TimeInfo> result = service.listPage(timeInfo   , page, rows);
        return result;
    }
}
